(C) 1996 AROS - The Amiga Replacement OS


NAME
#include <proto/exec.h>
void Supervisor()
SYNOPSIS
ULONG_FUNC userFunction

LOCATION
In SysBase at offset 5
FUNCTION
Supervisor will allow a short priviledged instruction sequence to be called from user mode. This has very few uses, and it is probably better to use any system supplied method to do anything.

The function supplied will be called as if it was a system interrupt, notably this means that you must *NOT* make any system calls or use any system data structures, and on certain systems you must use special methods to leave the code.

The code will not be passed any parameters.

INPUTS
userFunc
The address of the code you want called in supervisor mode.
RESULT
The code will be called.

NOTES
This function has completely different effects on different processors and architectures.

Currently defined effects are:

Kernel Effect ------------------------------------------------------------------- i386 (under emulation) None m68k (native) Runs the process in supervisor mode. The process must end with an RTE instruction. It should save any registers which is uses. m68k (under emulation)

EXAMPLE
BUGS
You can very easily make the system unusable with this function. In fact it is recommended that you do not use it at all.

SEE ALSO
SuperState(), UserState()
INTERNALS
You can do what you want with this function, even ignoring it if you don't think it makes any sense. But it could be quite useful to make it run something under different protection levels.

You should trust that the programmer know what they are doing :-)

HISTORY
05.08.1997 iaint
Kernel Changes - These are mostly functions which are normally implemented by the kernel, but might not be.